package com.glorystone.ins.service;

import com.glorystone.ins.domain.Advance;

import java.math.BigDecimal;
import java.util.List;

public interface AdvanceService {

    int insertApply(Advance advance);
    List<Advance> findSuccessStatus();

     List<Advance> findAdvanceList();

    Advance findAdvanceOne(Long tid);

    List<Advance> findAdvanceAmt();

    /**
     * 查询今日垫资限额信息
     * @return
     */
    Advance findTodayAdvance();

    /**
     * 修改今日实际垫资限额
     * @param actualAmount
     * @return
     */
    boolean upActualAmount(BigDecimal actualAmount);

    void insertTodatAmount(Advance advance);

    void checkAdvance(Advance advance);

    void checkAdvances(Advance advance);

    void rejectAdvance(Advance advance);

    /**
     * 图表数据
     */
    List<Advance> getAdvanceList(String status);

    /**
     * 每天处理失效的数据
     */
    void updateStatus();

    /**
     * 设置每日垫资额
     */
    void saveAmount(Advance advance);

    /**
     * 每天处理失效的数据
     */
    void clearData();

    Advance findClearData();
}
